package com.wu.util;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

public class JsonUtil {

	public static JSONObject stringToJson(String body) {

		JSONObject result = new JSONObject();
		if (body != null && !body.equals("")) {
			result = JSONObject.fromObject(body);
		}

		return result;
	}

	public static JSONArray stringToJsonArry(String body) {

		JSONArray result = new JSONArray();
		if (body != null && !body.equals("")) {
			result = JSONArray.fromObject(body);
		}

		return result;
	}
}
